﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ChainOfResponsibilityPattern;

internal class PM: AbstractAuditer
{
    //public required string Name { get; set; }
   /* private AbstractAuditer auditer;
    public void SetNext(AbstractAuditer abstractAuditer)
    {
        auditer = abstractAuditer;
    }*/
    public override void Audit(ApplyContext context)
    {
        /* if (context.Hours<=8)
         {
             context.AuditResult = true;
             context.AuditRemark = "Enjoy you vocation";
             Console.WriteLine($"{this.GetType().Name} {Name} 审批通过了{context.Name} {context.Hours}小时的请假");
         }
         else
         {
             //Manager manager = new Manager() { Name = "王五" };
             //manager.Audit(context);
             if (base.auditer != null)
             {
                 auditer.Audit(context);
             }
             InvokNext(context);
         }*/
        AuditAndInvokNext(context);
    }
}
